package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Goods;
import com.atguigu.jxc.vo.SaveStockVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * @description 商品信息
 */
public interface GoodsDao {


    String getMaxCode();

	Page<Goods> listInventory(@Param("goodsTypeId") Integer goodsTypeId, @Param("codeOrName") String codeOrName);



	Page<Goods> goodsListByNameAndTypeId(@Param("goodsName") String goodsName, @Param("goodsTypeId") Integer goodsTypeId);

	void saveGoods(@Param("goods") Goods goods);

	void updateGoods(@Param("goodsId") Integer goodsId, @Param("goods") Goods goods);

	Integer getStateByGoodsId(@Param("goodsId") Integer goodsId);

	void deleteGoodsById(@Param("goodsId") Integer goodsId);

	Page<Goods> getNoInventoryQuantity(@Param("nameOrCode") String nameOrCode);

	Page<Goods> getHasInventoryQuantity(@Param("nameOrCode") String nameOrCode);

	void saveStock(@Param("saveStockVO") SaveStockVO saveStockVO);

	void deleteStock(@Param("goodsId") Integer goodsId);

	List<Goods> listAlarm();

}
